
cmake_minimum_required(VERSION 3.0)

project(Test)

add_definitions(-g -Wall -Wshadow)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

set(open_libs gtest_main gtest)


set(parser_test parser_test.cpp)
set(hand_shake_test handshake_test.cpp)
set(message_process_test message_process_test.cpp)
set(server_connection_test server_connection_test.cpp)
set(client_test client_test.cpp)

set(public_module_file ./test_util.cpp)
aux_source_directory(./../ public_module_file)
aux_source_directory(./../../../public_module/loop_module public_module_file)
aux_source_directory(./../../../public_module/amf_module public_module_file)
aux_source_directory(./../../../public_module/loop_module/tools public_module_file)
aux_source_directory(./../../../public_module/log_module public_module_file)
aux_source_directory(./../../../public_module/socket_module public_module_file)
aux_source_directory(./../../../public_module/write_read_module public_module_file)
aux_source_directory(./../../../public_module/io_reuse_module public_module_file)

add_executable(parser_test ${parser_test} ${public_module_file})
add_executable(hand_shake_test ${hand_shake_test} ${public_module_file})
add_executable(message_process_test ${message_process_test} ${public_module_file})
add_executable(server_connection_test ${server_connection_test} ${public_module_file})
add_executable(client_test ${client_test} ${public_module_file})

target_link_libraries(parser_test ${open_libs})
target_link_libraries(hand_shake_test ${open_libs})
target_link_libraries(message_process_test ${open_libs})
target_link_libraries(server_connection_test ${open_libs})
target_link_libraries(client_test ${open_libs})


